home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Essential Home & Business Collection
/
The Essential Home & Business Collection.iso
/
27
/
3
/
5
/
HP22D5.ZIP
/
EXTERN
/
BORDER.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-04-16
|
1KB
|
63 lines
;
; SetBorder: Extension that sets the border color to a particular value.
;
; To use this extension from HyperPAD, move the extension into the desired
; pad (or into the home pad if you need from more than one pad).
;
; Examples:
;
; SetBorder blue;
; SetBorder red;
; for i = 1 to 16 do SetBorder i;
;
;
; This routine will work on EGA, VGA, and CGA. It will have no effect on MONO.
;
DOSSEG
.MODEL LARGE
EXTRN htoi:FAR
include extern.inc
.DATA
SetBorderName db 'setBorder',0
Pool PoolStruct <SetBorderName,SetBorder,,HANDLER>
PoolStruct <> ;END
.CODE
SetBorder proc far
push bp
mov bp,sp
push di
mov ax,[bp+6] ;NumArgs
cmp ax,1
jne SB_END
;get the handle to argument, convert it to an integer
les di,[bp+8] ;ES:DI = hArg1
push es
push di
call htoi ;AX = integer value
;set the border color using the video BIOS
mov bl,al ;bl = BorderValue
xor bh,bh ;bh = subfunction number
mov ah,0bh ;ah = int 10h function number
int 10h ;set the border value
SB_END:
mov ax,STOP ;terminate this message
pop di
pop bp
retf
SetBorder endp
END